#include <stdio.h>
#include <stdlib.h>
#include "stack_base_list.h"

int main(){
	int sum = 0;
	int n = 0;
	int i = 0;
	printf("请输入一个数\n");
	scanf("%d",&n);
	while(1){
	if(!scanf("%d",&n)) break;
	STACK *stack = stack_create();
	STACK_NODE *node = node_creat();
	if(node){
			sum = node -> sum;
			printf("sum已经求完了\n");
		}else{
				for(i = 0;i <= n;i++){
					sum = sum + 1;
					}
				node -> n = n;
				node -> sum = sum;
				STACK *tmp = NULL;
				tmp = n;
				n = node;
				printf("计算sum");
			}
		printf("sum = %d \n",sum);
	}
	return 0;
}
